function add(m){
    return m<10?'0'+m:m
}
function fortime(){
    let date=new Date();
    let y = date.getFullYear();
    let m = date.getMonth()+1;
    let d = date.getDate();
    let h = date.getHours();
    let mm = date.getMinutes();
    let s = date.getSeconds();
    return(y+'-'+add(m)+'-'+add(d)+' '+add(h)+':'+add(mm)+':'+add(s));
}


function formater(time){
    let date=new Date(time);
    let y = date.getFullYear();
    let m = date.getMonth()+1;
    let d = date.getDate();
    let h = date.getHours();
    let mm = date.getMinutes();
    let s = date.getSeconds();
    return(y+'-'+add(m)+'-'+add(d)+' '+add(h)+':'+add(mm)+':'+add(s));
}
